﻿using System;
using System.Runtime.InteropServices;

namespace MessagePack
{
	// Token: 0x02000008 RID: 8
	[StructLayout(LayoutKind.Explicit)]
	internal struct Float64Bits
	{
		// Token: 0x06000013 RID: 19 RVA: 0x00002494 File Offset: 0x00000894
		public Float64Bits(double value)
		{
			this = default(Float64Bits);
			this.Value = value;
		}

		// Token: 0x06000014 RID: 20 RVA: 0x000024B8 File Offset: 0x000008B8
		public Float64Bits(byte[] bigEndianBytes, int offset)
		{
			this = default(Float64Bits);
			if (BitConverter.IsLittleEndian)
			{
				this.Byte0 = bigEndianBytes[offset + 7];
				this.Byte1 = bigEndianBytes[offset + 6];
				this.Byte2 = bigEndianBytes[offset + 5];
				this.Byte3 = bigEndianBytes[offset + 4];
				this.Byte4 = bigEndianBytes[offset + 3];
				this.Byte5 = bigEndianBytes[offset + 2];
				this.Byte6 = bigEndianBytes[offset + 1];
				this.Byte7 = bigEndianBytes[offset];
			}
			else
			{
				this.Byte0 = bigEndianBytes[offset];
				this.Byte1 = bigEndianBytes[offset + 1];
				this.Byte2 = bigEndianBytes[offset + 2];
				this.Byte3 = bigEndianBytes[offset + 3];
				this.Byte4 = bigEndianBytes[offset + 4];
				this.Byte5 = bigEndianBytes[offset + 5];
				this.Byte6 = bigEndianBytes[offset + 6];
				this.Byte7 = bigEndianBytes[offset + 7];
			}
		}

		// Token: 0x0400000B RID: 11
		[FieldOffset(0)]
		public readonly double Value;

		// Token: 0x0400000C RID: 12
		[FieldOffset(0)]
		public readonly byte Byte0;

		// Token: 0x0400000D RID: 13
		[FieldOffset(1)]
		public readonly byte Byte1;

		// Token: 0x0400000E RID: 14
		[FieldOffset(2)]
		public readonly byte Byte2;

		// Token: 0x0400000F RID: 15
		[FieldOffset(3)]
		public readonly byte Byte3;

		// Token: 0x04000010 RID: 16
		[FieldOffset(4)]
		public readonly byte Byte4;

		// Token: 0x04000011 RID: 17
		[FieldOffset(5)]
		public readonly byte Byte5;

		// Token: 0x04000012 RID: 18
		[FieldOffset(6)]
		public readonly byte Byte6;

		// Token: 0x04000013 RID: 19
		[FieldOffset(7)]
		public readonly byte Byte7;
	}
}
